package com.hezhiqin.controller;

import com.hezhiqin.config.MqttUtils;
import com.hezhiqin.config.NasInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: hezhiqin
 * @time: 2020/7/15 10:47
 */

@RestController
public class MqttController {


    @GetMapping("/delete")
    public String delete (String id){
        return MqttUtils.deleteMqttClient(id);
    }


    @PostMapping("/add")
    public String add (@RequestBody NasInfo nasInfo){
        return MqttUtils.addMqttClient(nasInfo);
    }
}
